﻿using System;
using System.IO;

namespace ImageProcessingLib.Models
{
    public class ProcessedImage
    {
        public string FileName { get; set; }
        public byte[] Data { get; set; }
        public string OriginalPath { get; set; }

        public long SizeKB => (long)Math.Ceiling(Data.Length / 1024.0);

        public string FileExtension => Path.GetExtension(FileName)?.ToLower();

        public override string ToString()
        {
            return $"{FileName} | 格式: {FileExtension.ToUpper()} | 大小: {SizeKB} KB";
        }
    }
}